Skip to content

Fix additional Python and JupyterLab edge case - #182

Merged
Samruddhi Khandale (samruddhikhandale) merged 7 commits into
mainfrom
jungaretti/misplaced-jupyterlab
Sep 26, 2022
Merged

Fix additional Python and JupyterLab edge case#182
Samruddhi Khandale (samruddhikhandale) merged 7 commits into
mainfrom
jungaretti/misplaced-jupyterlab

Conversation

@jungaretti

@jungaretti JP Ungaretti (jungaretti) commented Sep 23, 2022

Copy link
Copy Markdown
Contributor

Related: devcontainers/images#125

Fixes an edge case in the Python feature that installs JupyterLab to the additionalVersions of Python instead of the primary version of Python.

This PR also removes junk from our JupyterLab test and adds a new test that would have caught this bug.

Edge Case Details

install_user_package installs packages to whatever Python installation is specified by $INSTALL_PATH. Both install_from_source and install_using_oryx overwrite this variable. When we use install_python to install an extra version of Python, we overwrite $INSTALL_PATH to that installation.

When we install JupyterLab at the end of the script, it uses the $INSTALL_PATH set by the most recent additionalVersions instead of version.

My fix saves $INSTALL_PATH before installing additional versions and restores it afterwards.

@jungaretti
JP Ungaretti (jungaretti) marked this pull request as ready for review September 24, 2022 00:05
@jungaretti
JP Ungaretti (jungaretti) requested a review from a team as a code owner September 24, 2022 00:05

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨
Can we make the image path change before merging this PR?

Comment thread test/python/scenarios.json Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants